﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.Odbc;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data.OracleClient;
using MySql.Data.MySqlClient;
using EnterpriseDataAccess.DataProviders;

namespace EnterpriseDataAccess.Process
{
    interface IDBEngine
    {
        Server ServerType { get; set; }

        string ConnectionString { get; set; }

        DbConnection Connection { get; }

        DbTransaction Transaction { get; }

        DbDataReader DataReader { get; set; }

        DbCommand Command { get; }

        DbParameter[] Parameters { get; }

        void Open();
        void BeginTransaction();
        void CommitTransaction();
        void RollBack();
        void CreateParameters(int paramsCount);
        void CreateParameters(DataRow row);
        void CreateParameters(Dictionary<string,object> parameters);
        void AddParameters(int index, string paramName, object objValue);
        DbDataReader ExecuteReader(CommandType commandType, string commandText);
        DataSet ExecuteDataSet(CommandType commandType, string commandText);
        DataTable ExecuteDataTable(CommandType commandType, string commandText);
        void FillDataTable(ref DataTable table, CommandType commandType, string commandText);
        object ExecuteScalar(CommandType commandType, string commandText);
        int ExecuteNonQuery(CommandType commandType,string commandText);
        void CloseReader();
        void Close();
        void Dispose();
    }
}
